import thenfs from "then-fs";

let arr = [
  thenfs.readFile("./data/a.txt", "utf8"),
  thenfs.readFile("./data/b.txt", "utf8"),
  thenfs.readFile("./data/c.txt", "utf8"),
];

Promise.all(arr).then(([r1, r2, r3]) => {
  console.log(r1, r2, r3);
})
.catch((err) => {
    console.log(err.message);
})

Promise.race(arr).then((r1) => {
    console.log(r1);
  })
  .catch((err) => {
      console.log(err.message);
  })